import { IsNotEmpty, IsNumber, IsString } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class CreateTopicDto {
  @ApiProperty({ description: '话题标题', example: '新话题标题' })
  @IsNotEmpty()
  @IsString()
  title: string;

  @ApiProperty({ description: '话题内容', example: '这是话题的具体内容' })
  @IsNotEmpty()
  @IsString()
  content: string;

  @ApiProperty({ description: '用户 ID', example: 1 })
  @IsNotEmpty()
  @IsNumber()
  userId: number;

  @ApiProperty({
    description: '话题媒体文件地址（视频或图片）',
    example: 'https://example.com/image.jpg',
    required: false,
  })
  @IsString()
  mediaUrl: string;
}
